package cn.cheniy.swiftmark.api.auth.feign;

import cn.cheniy.swiftmark.api.auth.bo.UserInfoInTokenBO;
import cn.cheniy.swiftmark.common.constant.Auth;
import cn.cheniy.swiftmark.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author cheniy
 * @description
 *  
 */
@FeignClient (value = "swiftmark-auth",contextId ="token")
public interface TokenFeignClient {

    /**
     * 校验token并返回token保存的用户信息
     * @param accessToken accessToken
     * @return token保存的用户信息
     */
    @GetMapping (value = Auth.CHECK_TOKEN_URI)
    ServerResponseEntity<UserInfoInTokenBO> checkToken(@RequestParam ("accessToken") String accessToken);

}
